import request from "@/utils/request.js";

//开始练习
export const startPractice = (data) => {
	let option = {
		method: "get",
		loading: true,
	};
	return request('/api/train/practise/start/' + data.modeCode, {}, option)
}

//继续练习
export const continuePractice = () => {
	let option = {
		method: "get",
		loading: true,
	};
	return request('/api/train/practise/continue', {}, option)
}

//开始模拟测试
export const startTest = () => {
	let option = {
		method: "get",
		loading: true,
	};
	return request('/api/train/test/start', {}, option)
}

//提交试卷
export const submitPaper = (data) => {
	let option = {
		method: "post",
		loading: true,
	};
	return request('/api/train/submit', data, option)
}

//获取试卷结果详情
export const getPaperById = (data) => {
	let option = {
		method: "get",
		loading: true,
	};
	return request('/api/train/' + data.id, {}, option)
}

//获取试卷结果详情
export const getOpenPaperById = (data) => {
	let option = {
		method: "get",
		loading: true,
	};
	return request('/open/api/student/train/' + data.id, {}, option)
}